﻿namespace ThingsGateway.Foundation
{
    public class LogNetConsole : LogNetBase
    {
        /// <summary>
        /// 控制台日志输出类型。
        /// 当<see cref="Log(LogType, string, string)"/>的类型，在该设置之内时，才会真正输出日志。
        /// </summary>
        public LogType ConsoleLogType { get; set; }
        public LogNetConsole()
        {
        }
        protected override void StartOut()
        {
            LogMessageItem logMessageItem = this.GetQueueLogItem();
            if (ConsoleLogType.HasFlag(logMessageItem.Degree))
                this.ConsoleWriteLog(logMessageItem);
            InvokeBeforeOut(this, logMessageItem);

        }
        public override string ToString()
        {
            return string.Format(nameof(LogNetConsole));
        }

    }
}